Glossary
Apple event A high-level message that adheres to the interprocess messaging protocol on which AppleScript is based.AppleScript A scripting language defined by Apple Computer, Inc., that allows you to control Macintosh computers without using the keyboard or mouse.
AppleScript command A command handled by AppleScript. AppleScript commands do not have to be included
in Tell statements.application command A command handled by an application or its objects.
An application command must either
be included in a Tell statement or include the name of the application in its direct parameter.application object An object stored in an application or its documents and managed by the application.
Arbitrary Element reference form A reference form that specifies an arbitrary object in a container. If the container is a value, AppleScript uses a random-number generator to choose the object. If the container is an application object, the application chooses the object.
assignment statement A statement that assigns a value to a variable. Assignment statements begin with Set or Copy.
attachable application An application that can be customized by attaching scripts to specific objects in the application, such as buttons and menu items.
attaching a script to an application object The process of associating a script with a specific application object. Each application determines which, if any, of its objects can have scripts attached.
attribute A characteristic that can be considered or ignored in a Considering or Ignoring statement.
binary operator An operator that derives a new value from a pair of values.
Boolean A logical truth value. The two possible Boolean values are
true
andfalse
. Boolean is an AppleScript
value class.Boolean expression An expression whose value can be either
true
orfalse.
child script object A script object that inherits properties and handlers from another script object, called the parent.
Class The name of the AppleScript value class for a class identifier, a reserved word that specifies the class to which an object
or value belongs. See also object class, value class.coercion The process of converting a value from one class to another.
command A word or phrase that requests an action. In AppleScript, there are four types of commands: AppleScript commands, application commands, scripting additions, and user-defined commands.
command handler A handler for an application or system command. Command handlers are similar to subroutines, but instead of defining responses to user-defined commands, they define responses to commands, such as Open, Print, or Move, that are sent to application objects.
comment Descriptive text that is ignored by AppleScript when a script is executed.
compile In AppleScript, to convert a script from the form typed into a script editor to a form that can be used by AppleScript. The process of compiling a script includes syntax and vocabulary checks. A script is compiled when you first run it and again when you modify it and then run it again, save it, or check its syntax.
compiled script The form to which a script is converted when you compile it. The form of a compiled script is independent of the dialect in which a script is written.
complete reference A reference that has enough information to identify an object or objects uniquely. For a reference to an application object to be complete, its outermost container must be the application itself.
composite value A value that contains other values. AppleScript has three types of composite values: lists, records, and strings.
compound statement A statement that occupies more than one line and contains other statements. A compound statement begins with a reserved word indicating its function and ends with the word
end
.conditional statement See If statement.
Considering statement A control statement that lists a specific set of attributes to be considered when AppleScript performs operations on strings or sends commands to applications.
constant A reserved word defined by AppleScript or an application in its dictionary. Constant is an AppleScript value class.
container An object that contains one or more other objects, known as elements. You specify containers with the reserved words
of
orin
.continuation character A character (ÿ) used in the Script Editor to extend a statement to the next line.
control statement A statement that controls when and how one or more other statements are executed. The types of control statements you can use in AppleScript are Tell, If, Repeat, Considering and Ignoring, With Timeout, and With Transaction.
current application Either the default target application or whatever application is currently set as a script's parent property.
current directory The folder or volume whose contents you can see when you choose Open or the equivalent command from an application's File menu.
current script The script from which a user-defined command is executed.
Data An AppleScript value class used for data that do not belong to any of the other AppleScript value classes. In AppleScript, a value that belongs to the class Data can be stored in a variable, but cannot be manipulated.
Date An AppleScript value class used for a value that specifies a time, day of the month, month, and year.
declaration The first occurrence of a variable or property identifier in a script. The form and location of the declaration determine how AppleScript treats the identifier in that script--for example, as a property, global variable, or local variable.
default target The object that receives a command if no object is specified or if the object is incompletely specified in the command. Default targets are specified in Tell statements.
delegation The use of a Continue statement to call a handler in a parent script object or the current application.
dialect A version of the AppleScript language that resembles a specific human language or programming language; for example, AppleScript English resembles English, AppleScript Japanese resembles Japanese, and so on. All scripts, regardless of the dialects in which they are written, are converted to the same form, called a compiled script, when they are compiled.
dictionary The set of commands, objects, and other words that are understood by a particular application or by a version of the system software. Each application or version of the system software has its own dictionary.
direct parameter The parameter immediately following a command.
element An object contained within another object, or a type of object that can be contained in another object. For example, a word object is an element of a paragraph object, but it is possible to have a paragraph with no words.
empty list A list with no items.
error expression An expression, usually a string, that describes an error.
error handler A collection of statements that are executed in response to an error message.
error message A message that is returned by an application, by AppleScript, or by the Macintosh Operating System if an error occurs during the handling of a command.
error number An integer that identifies
an error.evaluation The conversion of an expression to a value.
Every Element reference form A reference form that specifies every object
of a particular class in a container.Exit statement A statement used in the body of a Repeat statement to exit the Repeat statement.
explicit Run handler A handler at the top level of a script or a script object that begins with
on run
and ends withend
. A single script or script object can include an explicit Run handler or an implicit Run handler, but not both.expression In AppleScript, any series of words that has a value.
filter A phrase, added to a reference to a system or application object, that specifies elements in a container that match one or more conditions.
Filter reference form A reference form that specifies all objects in a container that match one or more conditions specified
in a Boolean expression.formal parameter See parameter variable.
global variable A variable that is available anywhere in the script in which it is defined.
handler A collection of statements that are executed in response to a command or an error message.
identifier A series of characters that identifies a value or handler in AppleScript. Identifiers are used to name variables, subroutines, parameters, properties, and commands.
ID reference form A reference form
that specifies an object by the value of its
ID property.If statement A control statement that contains one or more Boolean expressions whose results determine whether to execute other statements within the If statement.
Ignoring statement A control statement that lists a specific set of attributes to be ignored when AppleScript performs operations on strings or sends commands to applications.
implicit Run handler All the statements at the top level of a script except for property declarations, script object definitions, and other command handlers. A single script or script object can include an explicit Run handler or an implicit Run handler, but not both.
Index reference form A reference form that specifies an object or location by describing its position with respect to the beginning or end of the container.
infinite loop A Repeat statement that does not specify when repetition stops.
inheritance The process by which a child script object receives the properties and handlers of a parent script object.
initializing a script object The process of creating a script object from the properties and handlers listed in a script object definition. AppleScript creates a script object when it runs a script or handler that contains a script object definition.
insertion point An object class, supported by many applications, that specifies a
place where another object or objects can
be added.integer A positive or negative number without a fractional part. In AppleScript, Integer is a value class.
item A value in a list or record. An item is specified by its offset from the beginning or end of the list or record.
labeled parameter A parameter that is identified by a label. See also positional parameter.
list An ordered collection of values.
Lists are enclosed by braces. The values in
a list are separated by commas. List is an AppleScript value class.literal expression An expression that evaluates to itself.
local variable A variable that is available only in the handler in which it is defined. Variables that are defined within subroutines, command handlers, and error handlers are local unless they are explicitly declared as global variables.
loop A series of statements that is repeated.
looping variable A variable whose value controls the number of times the statements in a Repeat statement are executed.
Middle Element reference form A reference form that specifies the middle object of a particular class in a container.
Name reference form A reference form that specifies an object by the value of its Name property.
nested control statement A control statement that is contained within another control statement.
Number A synonym for the AppleScript value classes Integer and Real.
object An identifiable part of an application, or thing within an application, that can respond to commands.
object class A category for objects that share characteristics such as properties
and element classes and respond to the same commands.operand A value from which an operator derives another value.
operation An expression that derives a new value from one or more other
values. An operator, such as the addition operator (+
), concatenation operator (&
),
or Contents Of, determines how the new value is derived.operator An AppleScript language element (a word, series of words, or symbol) used in an expression to derive a value from another value or pair of values.
optional parameter A parameter that need not be included for a command to
be successful.parameter variable An identifier in a subroutine definition that represents the actual value of a parameter when the subroutine is called. Also called formal parameter.
parent script object A script object from which another script object, called the child, inherits properties and handlers.
partial reference A reference that does not include enough information to identify
an object or objects uniquely. When AppleScript encounters a partial reference, it uses the default object specified in the Tell statement to complete the reference.positional parameter A subroutine parameter that is identified by the order
in which it is listed. In a subroutine call, positional parameters are enclosed in parentheses and separated by commas. They must be listed in the order in which they appear in the corresponding subroutine definition.property A characteristic of an object that has a single value and is identified by a label. See also script property.
Property reference form A reference form that specifies a property of an application object, record or script object.
Range reference form A reference form that specifies a series of objects of the same class in the same container.
real A number that can include a decimal fraction. Real is an AppleScript value class.
record An unordered collection of properties. Properties within a record are identified by labels that are unique within the record. Record is an AppleScript
value class.recordable application An application that uses Apple events to report user actions for recording purposes. When recording is turned on, the Script Editor creates statements corresponding to any significant actions you perform in a recordable application.
recursive subroutine A subroutine that calls itself.
reference A phrase that specifies one or more objects using the reference forms defined in the AppleScript dialect you
are using. Reference is an AppleScript
value class.reference form The syntax for referring
to objects. The reference forms for the AppleScript English dialect include Arbitrary Element, Every Element, Filter, ID, Index, Middle Element, Name,Property, Range, and Relative.Relative reference form A reference form that specifies an object or location by describing its position in relation to another object, known as the base, in the same container.
Repeat statement A control statement that contains a series of statements to be repeated and, in most cases, instructions that specify when the repetition stops.
required parameter A parameter that must be included for a command to be successful.
reserved words The words in system and application dictionaries, including object and command names, constants, parameters, and properties.
result A value generated when a command is executed or an expression evaluated.
scope The visibility and context of a variable or property, which determines where else in a script you may refer to the same variable. The scope of a variable depends on where you declare it and whether you declare it as global or local. The scope of a property extends to the entire script or script object in which it
is declared.script A series of written instructions that, when executed, cause actions in applications and on the desktop.
scriptable application An application that can respond to application commands sent to it when an application such as Script Editor runs a script.
script application An application whose only function is to run the script associated with it.
script code A constant that identifies
a particular script system for use on Macintosh computers.script editor An application used to create and modify scripts.
Script Editor The script-editing application that comes with the AppleScript English language dialect.
scripting addition A file that provides additional commands you can use in scripts. Each scripting addition contains one or more command handlers. If a scripting addition is located in the Scripting Additions folder (in the Extensions folder of the System Folder), the command handlers it provides are available for use by any script whose target is an application on
that computer.script object A user-defined object in a script that combines data (in the form of properties) and potential actions (in the form of handlers).
script object definition A compound statement that contains a collection of properties, handlers, and other AppleScript statements. A script object definition begins with the reserved word
script
, followed by an optional variable name, and ends with the keywordend
(orend script
).script property A named container in which to store a value. Script properties are similar to variables, but they are persistent. Unlike variable values, script property values are saved when you save a script.
script system A collection of system software facilities that allow for the visual representation of a particular writing system. Script systems include Roman, Japanese, Hebrew, Greek, and Thai.
simple statement A statement that is contained on a single line and ends with
a return character. See also compound statement.simple value A value, such as an
integer or a constant, that does not
contain other values.statement A series of AppleScript words, similar to an English sentence, that contains a request for an action or an expression to be evaluated. See also compound statement, simple statement.
string An ordered series of characters (a character string). String is an AppleScript value class.
Styled Text A synonym for the AppleScript value class String. A string referred to as Styled Text may include
style and font information.subroutine A collection of statements that are executed in response to a user-defined command.
suite A set of AppleScript words that
are related.synonym An AppleScript word, phrase, or language element that has the same meaning as another AppleScript word, phrase, or language element. For example, the operator
does not equal
is a synonym for≠
.syntax The arrangement of words in an AppleScript statement.
syntax description A template for using a command or control statement in a script.
target The recipient of a command. Potential targets include application objects, script objects, the current script, and the current application.
Tell statement A control statement that specifies the default target for the statements it contains.
test A Boolean expression that specifies the conditions of a filter or an If statement.
Text A synonym for the AppleScript value class String.
Try statement A two-part compound statement that contains a series of AppleScript statements, followed by an error handler to be invoked if any of
those statements cause an error.unary operator An operator that derives a new value from a single value.
user-defined command A command that triggers the execution of a collection of statements, called a subroutine, elsewhere in the same script.
value A type of data that can be manipulated by and stored in scripts. The AppleScript value classes are Boolean, Class, Constant, Data, Date, Integer, List, Real, Record, Reference, and String.
value class A category of values with similar characteristics. Values that belong
to the same class respond to the same operators.variable A named container in which to store a value.
With Timeout statement A control statement that allows you to change the amount of time AppleScript waits for application commands to complete before stopping execution of the script.
With Transaction statement A control statement that allows you to take advantage of applications that support the notion of a transaction--a sequence of related events that should be performed as if they were a single operation.